import request from '@/utils/request'
import {parseStrEmpty} from "@/utils/ruoyi";

// 查询盘点任务列表
export function listTask(query) {
    return request({
        url: '/wms/task/checkList',
        method: 'get',
        params: query
    })
}

//查询盘点出库任务
export function listOutTask(query) {
    return request({
        url: '/wms/task/checkOutList',
        method: 'get',
        params: query
    })
}

// 查询任务查询详细
export function getTask(taskId) {
    return request({
        url: '/wms/task/' + parseStrEmpty(taskId),
        method: 'get'
    })
}

// 新增任务查询
export function addTask(data) {
    return request({
        url: '/wms/task',
        method: 'post',
        data: data
    })
}

// 修改任务查询
export function updateTask(data) {
    return request({
        url: '/wms/task',
        method: 'put',
        data: data
    })
}

// 删除任务查询
export function delTask(taskId) {
    return request({
        url: '/wms/task/' + taskId,
        method: 'delete'
    })
}

//盘点取消
export function delCheckTask(data) {
    return request({
        url: '/wms/task/cancel/',
        method: 'post',
        data: data
    })
}

// 创建盘点任务
export function createCheckTask(data) {
    return request({
        url: '/wms/check/create',
        method: 'post',
        data: data
    })
}
//盘点出库执行
export function outboundTask(data) {
    return request({
        url: '/wms/check/execute',
        method: 'post',
        data: data
    })
}
//盘点确认
export function checkTaskAffirm(data) {
    return request({
        url: '/pda/check-affirm',
        method: 'post',
        data: data
    })
}

